#!/usr/bin/python
# -*- coding: UTF-8 -*-

"""
For循环输出乘法表
"""


def for01():
    """
    For循环输出乘法表，效果一
    :return: No
    """
    print("For循环输出乘法表，效果一")
    for i in range(1, 10, 1):
        for o in range(1, i + 1):
            print('{}x{}={:<3}'.format(o, i, i * o), end="")
        print("")
    __lines()


def for02():
    """
    For循环输出乘法表，效果二
    :return: No
    """
    print("For循环输出乘法表，效果二")
    for i in range(9, 0, -1):
        for o in range(1, i + 1):
            print('{}x{}={:<3}'.format( o, i, i * o), end="")
        print("")
    __lines()


def for03():
    """
    For循环输出乘法表，效果三
    :return: No
    """
    print("For循环输出乘法表，效果三")
    for i in range(1, 10):
        for ii in range(9 - i, 0, -1):
            print(' ' * 6, end=' ')
        for o in range(i, 0, -1):
            # print(i,end=' ')
            print('{}x{}={:<3}'.format(o, i, i * o), end="")
        print("")
    __lines()


def for04():
    """
    For循环输出乘法表，效果四
    :return: No
    """
    print("For循环输出乘法表，效果四")
    for i in range(9, 0, -1):
        for ii in range(9 - i, 0, -1):
            print(' ' * 6, end=' ')
        for o in range(i, 0, -1):
            # print(i,end=' ')
            print('{}x{}={:<3}'.format(o, i, i * o), end="")
        print("")
    __lines()


def __lines():
    print("="*61)
    input("请按任意键继续操作!")
